﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using System.Collections.Generic;
using System.IO;
using BUS;
using DTO;
using System.Text;
namespace Cucre
{
    public partial class thongtindoanhnghiep : System.Web.UI.Page
    {
        protected override void OnPreInit(EventArgs e)
        {
            base.OnPreInit(e);
            string path = Server.MapPath("theme.txt");
            StreamReader SR = new StreamReader(path);
            string nameTheme = SR.ReadLine();
            SR.Close();
            base.OnPreInit(e);
            if (Session["MyTheme"] == null)
            {
                Session.Add("MyTheme", nameTheme);
                Page.Theme = (string)Session["MyTheme"];
            }
            else
            {
                Page.Theme = (string)Session["MyTheme"];
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            PROVIDER provider = (PROVIDER)Session["user_login"];
            if (provider == null)
            {
                HoTen.Text = "";
                Email.Text = "";
                Username.Text = "";
                cmnd.Text = "";
                Address.Text = "";
                Phone.Text = "";
            }
            else
            {
                HoTen.Text = provider.ACCOUNT.FULLNAME;
                Email.Text = provider.ACCOUNT.EMAIL;
                Username.Text = provider.ACCOUNT.USERNAME;
                cmnd.Text = provider.ACCOUNT.CMND;
                Address.Text = provider.ACCOUNT.ADDRESS;
                Phone.Text = provider.ACCOUNT.PHONE_NUMBER;
                TenCongTy.Text = provider.COMPANY_NAME;
                ThongTinDoanhNghiep.Text = provider.INTRODUCE_COMPANY;

            }

        }
    }
}
